package com.jack.repository

import com.jack.api.ApiMgr
import com.jack.bean.ArtileBean
import com.jack.bean.RespResult
import kotlinx.coroutines.delay


interface HomeArticleRepo {
    suspend fun fetchData(): RespResult<ArtileBean>
}

class HomeArticleRemoteRepo : HomeArticleRepo {
    override suspend fun fetchData(): RespResult<ArtileBean> = ApiMgr.api.homeAritleList()
}

class HomeArticleTestRepe : HomeArticleRepo{
    override suspend fun fetchData(): RespResult<ArtileBean> {
        delay(2000)
        return ApiMgr.api.homeAritleList()
    }

}